<!--版面入口-->
<script setup>
import {ForumEntry} from "@ginstone/nga-api/dist/src/response/Forum";

import {ref, toRefs} from "vue";
import {routeNames} from "@/router";
import ForumAvatar from "@/components/forum/ForumAvatar.vue";

const defaultIcon = "/resources/ngabbs/nga_classic/f/00.png"

const props = defineProps({forum: ForumEntry})
const {forum} = toRefs(props);
const {
  forumId,
  name,
  simpleName,
  info,
  simpleInfo,
  longInfo,
  bit,
  colTid,
  icon,
} = toRefs(forum.value)

// 目标路由
const targetRoute = ref({
  name: colTid ? routeNames.thread.colList : routeNames.thread.forumList,
  params: {
    id: colTid ? colTid : forumId
  },
})
</script>

<template>
  <router-link :to="targetRoute" style="width: 90px;text-align: center;display:inline-block;vertical-align: top;cursor: pointer;margin-top: 5px">
    <forum-avatar :url="forum.iconBig"/>
    <br>
    <el-link :underline="false">
      {{ name }}
    </el-link>
  </router-link>
</template>

<style scoped>

</style>